<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../node_modules/react/umd/react.development.js"></script>
    <script src="../node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="../node_modules/babel-standalone/babel.min.js"></script>
  </head>
  <body>
    <div id="reactDom"></div>
    <script type="text/babel">
      // 父子组件
      function MyComA() {
        return <h1>我是第一个组件</h1>;
      }
      function MyComB() {
        return <h1>我是第二个组件</h1>;
      }
      function MyComC() {
        return <h1>我是第三个组件</h1>;
      }
      function MyComD() {
        return <h1>我是第四个组件</h1>;
      }

      // 父组件调用
      function Com() {
        return (
          <div>
            <MyComA />
            <MyComB />
            <MyComC />
            <MyComD />
          </div>
        );
      }

      ReactDOM.render(<Com />, document.getElementById("reactDom"));
    </script>
  </body>
</html>
